#

OUTFILE_BASE = sif2 ;
OUTDIR ?= bin ;
SUBDIR ?= . ;
BITS64_SEP = _x ;

include $(SUBDIR)/Jam.toolchain ;

SRC = swnd.c nargv.c res.rc dirwalk.c recent.c mstr.c array.c ini.c config.c search.c mask.c kmem_cache.c save.c elapsed.c shlink.c ;

SEARCH_SOURCE = src res ;
HDRS = include ;

OPTIM = -O2 ;
CCFLAGS = -Wall -funsigned-char $(ARCHFLAGS) ;

LINKLIBS = -lcomctl32 -lole32 -luuid -lshlwapi ;
LINKFLAGS = -mwindows -s $(ARCHLINKFLAGS) ;

################################
## rule to create ico object
################################
rule Resource
{
  Depends $(<) : $(>) ;
}

################################
## common UserObject custom rule
################################
rule UserObject
{
    switch $(>:S)
    {
        case .rc : Resource $(<) : $(>) ;
    }
}

################################
## actions to create ico object
################################
actions Resource
{
$(WINDRES) $(>) $(<)
}

Main $(OUTFILE) : $(SRC) ;
InstallBin $(OUTDIR) : $(OUTFILE) ;
